package entities;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.Unique;
import javax.persistence.Id;

import com.googlecode.objectify.annotation.Cached;
import com.googlecode.objectify.annotation.Indexed;
import com.googlecode.objectify.annotation.Unindexed;

@Cached
public class OwnerDomain implements Serializable {
	@Id private String id = "";
	
	@Indexed private String username = "";
	
	@Indexed private String domain = "";
	
	@Unindexed private String codeVerify = "";
	
	@Unindexed private String verifyMethod = "url"; // (url / code)
	
	@Indexed private int status = 0; //0-unverify, 1-verify
	
	@Unindexed private String title = "";
	
	@Unindexed private String description = "";
	
	@Indexed private Date lastUpdate = new Date();
	
	@Indexed private int isUpdated = 1; //0-not update, 1-updated
	
	@Unindexed private int active = 1; //0-hidden, 1-active
	
	@Unindexed private String googleAnalyticPropertyId = "";
	
	@Unindexed private String analyticProfileId = "";
	
	public String getId() {
		return id;
	}

	public void setId() {
		this.id = username + "-" + domain;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getDomain() {
		return domain;
	}

	public void setDomain(String domain) {
		this.domain = domain;
	}

	public String getCodeVerify() {
		return codeVerify;
	}

	public void setCodeVerify(String codeVerify) {
		this.codeVerify = codeVerify;
	}

	public String getVerifyMethod() {
		return verifyMethod;
	}

	public void setVerifyMethod(String verifyMethod) {
		this.verifyMethod = verifyMethod;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getLastUpdate() {
		return lastUpdate;
	}

	public void setLastUpdate(Date lastUpdate) {
		this.lastUpdate = lastUpdate;
	}

	public int getIsUpdated() {
		return isUpdated;
	}

	public void setIsUpdated(int isUpdated) {
		this.isUpdated = isUpdated;
	}

	public int getActive() {
		return active;
	}

	public void setActive(int active) {
		this.active = active;
	}

	public String getGoogleAnalyticPropertyId() {
		return googleAnalyticPropertyId;
	}

	public void setGoogleAnalyticPropertyId(String googleAnalyticPropertyId) {
		this.googleAnalyticPropertyId = googleAnalyticPropertyId;
	}

	public String getAnalyticProfileId() {
		return analyticProfileId;
	}

	public void setAnalyticProfileId(String analyticProfileId) {
		this.analyticProfileId = analyticProfileId;
	}

}
